using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
public static class CryptUtil
{
	public static byte[] smethod_0(string string_0)
	{
		byte[] bytes = Encoding.UTF8.GetBytes(string_0);
		for (int i = 0; i < bytes.Length; i++)
		{
			bytes[i] = (byte)((int)bytes[i] - i % 100 - 100);
		}
		return bytes;
	}
	public static string smethod_1(byte[] byte_0, int int_0)
	{
		for (int i = 0; i < int_0; i++)
		{
			byte_0[i] = (byte)((int)byte_0[i] + i % 100 + 100);
		}
		return Encoding.UTF8.GetString(byte_0, 0, int_0);
	}
	public static string encrypt(string string_0)
	{
		string s = "VavicApp";
		string s2 = "VavicApp";
		byte[] bytes = Encoding.ASCII.GetBytes(s);
		byte[] bytes2 = Encoding.ASCII.GetBytes(s2);
		DESCryptoServiceProvider dESCryptoServiceProvider = new DESCryptoServiceProvider();
		int arg_32_0 = dESCryptoServiceProvider.KeySize;
		MemoryStream memoryStream = new MemoryStream();
		CryptoStream cryptoStream = new CryptoStream(memoryStream, dESCryptoServiceProvider.CreateEncryptor(bytes, bytes2), CryptoStreamMode.Write);
		StreamWriter streamWriter = new StreamWriter(cryptoStream);
		streamWriter.Write(string_0);
		streamWriter.Flush();
		cryptoStream.FlushFinalBlock();
		streamWriter.Flush();
		return Convert.ToBase64String(memoryStream.GetBuffer(), 0, (int)memoryStream.Length);
	}
	public static string decrypt(string string_0)
	{
		string s = "VavicApp";
		string s2 = "VavicApp";
		byte[] bytes = Encoding.ASCII.GetBytes(s);
		byte[] bytes2 = Encoding.ASCII.GetBytes(s2);
		byte[] buffer;
		try
		{
			buffer = Convert.FromBase64String(string_0);
		}
		catch (Exception ex)
		{
			return ex.ToString();
		}
		DESCryptoServiceProvider dESCryptoServiceProvider = new DESCryptoServiceProvider();
		MemoryStream stream = new MemoryStream(buffer);
		CryptoStream stream2 = new CryptoStream(stream, dESCryptoServiceProvider.CreateDecryptor(bytes, bytes2), CryptoStreamMode.Read);
		StreamReader streamReader = new StreamReader(stream2);
		return streamReader.ReadToEnd();
	}
}
